#include <iostream>
#include <string>
using namespace std;

int main() {
  string str1 = "abcdefgh";
  int pos = str1.find("de");
  cout << "str1 find de position : " << pos << endl;
  int pos2 = str1.find("j");
  cout << "str1 find j position : " << pos2 << endl;

  int pos3 = str1.rfind('h');
  cout << "str1 find h position : " << pos3 << endl;

  string str2 = str1.replace(1,3,"1111");
  cout << "str1 replace str2 : " << str2 << endl;
  return 0;
}